package com.practice.dp;

public class CtrlACV {
	public int getMaximumA(int n) {
		int[] a = new int[n];
		for (int i=0; i<3 && i<n; i++) a[i] = i+1;
		for (int i=3; i<n; i++) {
			a[i] = Math.max(a[i-1] + 1, a[i-3]*2);		
		}
		return a[n-1];
	}
}
